<?php

use think\migration\Migrator;
use think\migration\db\Column;

class CreateJpushUser extends Migrator
{
    public function up(){
        $table = $this->table('jpush_user',['comment'=>'极光用户表']);
//        $table->addColumn('jpush_id','string',['limit'=>255,'comment'=>'极光id'])
//            ->addColumn('user_id','integer',['limit'=>10,'comment'=>'用户id'])
//            ->addForeignKey('user_id', 'user', 'id', ['delete'=> 'CASCADE'])
//            ->addColumn('is_sent','integer',['limit'=>1,'default'=>1,'comment'=>'1推送 0不推送'])
//            ->addColumn('login_time','datetime',['comment'=>'登录时间'])
//            ->addColumn('sex','integer',['limit'=>1,'default'=>0,'comment'=>'性别 0未知 1男 2女 '])
//            ->addColumn('longitude','string',['limit'=>30,'comment'=>'经度'])
//            ->addColumn('latitude','string',['limit'=>30,'comment'=>'维度'])
//            ->addColumn('region_tag','string',['limit'=>120,'comment'=>'地区标签'])
//            ->create();
    }
    public function down(){
        $this->dropTable('jpush_user');
    }
}
